package deploy

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type DeployAuthorizedRouter struct{}

// InitDeployAuthorizedRouter 初始化 授权管理 路由信息
func (s *DeployAuthorizedRouter) InitDeployAuthorizedRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	deployAuthorizedRouter := Router.Group("deployAuthorized").Use(middleware.OperationRecord())
	deployAuthorizedRouterWithoutRecord := Router.Group("deployAuthorized")
	deployAuthorizedRouterWithoutAuth := PublicRouter.Group("deployAuthorized")
	{
		deployAuthorizedRouter.POST("createDeployAuthorized", deployAuthorizedApi.CreateDeployAuthorized)             // 新建授权管理
		deployAuthorizedRouter.DELETE("deleteDeployAuthorized", deployAuthorizedApi.DeleteDeployAuthorized)           // 删除授权管理
		deployAuthorizedRouter.DELETE("deleteDeployAuthorizedByIds", deployAuthorizedApi.DeleteDeployAuthorizedByIds) // 批量删除授权管理
		deployAuthorizedRouter.PUT("updateDeployAuthorized", deployAuthorizedApi.UpdateDeployAuthorized)              // 更新授权管理
	}
	{
		deployAuthorizedRouterWithoutRecord.GET("findDeployAuthorized", deployAuthorizedApi.FindDeployAuthorized)       // 根据ID获取授权管理
		deployAuthorizedRouterWithoutRecord.GET("getDeployAuthorizedList", deployAuthorizedApi.GetDeployAuthorizedList) // 获取授权管理列表
	}
	{
		deployAuthorizedRouterWithoutAuth.GET("getDeployAuthorizedPublic", deployAuthorizedApi.GetDeployAuthorizedPublic) // 获取授权管理列表
	}
}
